home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Risc World 3
/
Risc World 3.iso
/
SOFTWARE
/
ISSUE6
/
GAMES
/
SANTA
/
!Santa
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
2000-04-17
|
18KB
|
885 lines
>>>
Andy Spence 2000
>>> This is a pre-release demo version.
>>> Feel to distribute this, but all of the graphics and code is
Andy Spence 2000, so don't be nicking them.
"ERROR ";
$," at line ";
-area%=
load_sprites("<obey$dir>.Sprites")
bx%=128
by%=96
mapx%=10
mapy%=10
maxbaddies%=8
maxbonuses%=100
maxfg%=15
badex%=114
badey%=52
colc%=1
scrno%=1
screen%=1
bally%=(by%*5)+18
blocks%=14
tree%=1
tree2%=1
mblocks%=0
block%=0
switches%=0
screen1
map%(mapx%,mapy%)
s$(blocks%)
bon%(3,maxbonuses%)
forg%(3,maxfg%)
bad%(9,maxbaddies%)
movblo%(8,4)
switch%(5,3)
s$(0)="0"
s$(1)="1"
s$(2)="2"
s$(3)="3"
s$(4)="4"
s$(5)="5"
s$(6)="6"
s$(7)="7"
s$(8)="8"
s$(9)="9"
s$(10)="10"
s$(11)="11"
s$(12)="12"
s$(13)="13"
s$(14)="door"
cgems%=0
crings%=0
cpresents%=0
cpuddings%=0
lives%=3
livfr%=1
progress%=1
complete%=0
move%=0
move2%=1
speed%=12
fspeed%=12
dir%=1
fall%=0
jump%=0
jumpc%=0
bframe%=1
frame%=1
bdframe%=1
die%=0
complete%=0
drawblob
complete%=1
setup:
die%=0
complete%=0
drawscreen
drawblob
lives
move%=0
-122
right
fall%=0
jump%=1:
jump%=1
jump%=0
checkff
fall%=1
collect
baddie
background
move%>0
move2%=1
balls>0
mball
move%=1
drawblob
bonus
move%=0
move2%=1
stand:move2%=0
balls>0
balls
foreground
switches
complete
wait(delay)
-113
die%=1:progress%=5
die%=1
complete%=1
complete%=1
progress%+=1
progress%=5
lives%<=0
gameover
wait(200)
sprite("santacool",306,446)
menu%=1
menu%=1
sprite("starts",286,384):
sprite("options",432,248):
sprite("quit",742,172)
menu%=2
sprite("start",286,384):
sprite("optionss",432,248):
sprite("quit",742,172)
menu%=3
sprite("start",286,384):
sprite("options",432,248):
sprite("quits",742,172)
-122
menu%+=1
menu%-=1
menu%=0
menu%=1
menu%=4
menu%=3
wait(7)
menu%=1
menu%=2
options
menu%=3
*desktop
progress%=1
setup
options
gameover
sprite("gameover",430,395)
selscr
progress%=1
screen1
progress%=2
screen2
progress%=3
screen3
progress%=4
screen4
setup
plot%=0
bmy%=1
maxbonuses%
bon%(1,bmy%)=0
fmy%=1
maxfg%
forg%(1,fmy%)=0
bady%=1
maxbaddies%
bad%(1,bady%)=0
selscr
my%=1
mapy%
mx%=1
mapx%
map%(mx%,my%)
bmy%=1
levbon%
bmx%=1
bon%(bmx%,bmy%)
fmy%=1
fmx%=1
forg%(fmx%,fmy%)
bady%=1
baddies%
badx%=1
bad%(badx%,bady%)
bloy%=1
mblocks%
blox%=1
block%=1
movblo%(blox%,bloy%)
switches%>0
swiy%=1
switches%
swix%=1
switch%(swix%,swiy%)
lives
livfr%
1:heart%=1
11:heart%=2
12:heart%=2
13:heart%=3
14:heart%=3
lives%>=1
sprite("4",0,0):
sprite("he"+
(heart%),20,10)
lives%>=2
sprite("4",128,0):
sprite("he"+
(heart%),120,10)
lives%=3
sprite("4",256,0):
sprite("he"+
(heart%),220,10)
livfr%+=1
livfr%=14
livfr%=1
destroybonuses
bmy%=1
levbon%
bon%(1,bmy%)
1:mask2$="presentsm"
2:mask2$="ringm"
3:mask2$="gemm"
4:mask2$="puddingm"
sprite(mask2$,bon%(2,bmy%),bon%(3,bmy%))
bon%(1,bmy%)=0
bonuses%=0
manx%=comx%-10
many%=comy%+96
drawblob
stand
frame%=0
drawblob
move%=1
dir%=0
jump%=0
fall%=0
frame%+=1
frame%>8
frame%=1
manx%<=0
manx%=0:
manx%>=bx%
map%(((manx%-bx%)
bx%)+1,10-(many%
by%))>2
manx%<=((manx%
bx%)*bx%)+speed%
manx%=(manx%
bx%)*bx%:
many%<>(many%
by%)*by%
map%(((manx%-bx%)
bx%)+1,10-((many%+by%)
by%))>2
manx%<=(manx%
bx%)*bx%+speed%
many%-((many%
by%)*by%)>=38
manx%=(manx%
bx%)*bx%:
manx%=manx%-speed%
right
move%=1
dir%=1
jump%=0
fall%=0
frame%+=1
frame%>8
frame%=1
manx%>=1204
manx%=1204:
manx%<bx%*9
map%(((manx%+bx%)
bx%)+1,10-(many%
by%))>2
manx%>=((manx%
bx%)*bx%)+60-speed%
manx%=((manx%
bx%)*bx%)+58:
many%<>(many%
by%)*by%
jump%=1
q
map%(((manx%+bx%)
bx%)+1,10-((many%+by%)
by%))>2
map%((manx%
bx%)+1,10-((many%+by%)
by%))<2
o
many%-(many%
by%)*by%>36
manx%>=((manx%
bx%)*bx%)+60-speed%
manx%=((manx%
bx%)*bx%)+60:
fall%=1
@
map%(((manx%+bx%)
bx%)+1,10-((many%+by%)
by%))>2
s
many%-((many%
by%)*by%)>=36
manx%>=((manx%
bx%)*bx%)+60-speed%
manx%=((manx%
bx%)*bx%)+60:
manx%=manx%+speed%
drawblob
dir%=0
jump%=1
sprite("cb9",manx%,many%):
fall%=1
sprite("cb10",manx%,many%):
sprite("cb"+
(frame%)),manx%,many%)
dir%=1
jump%=1
sprite("c9",manx%,many%):
fall%=1
sprite("c10",manx%,many%):
sprite("c"+
(frame%)),manx%,many%)
dir%=0
fall%=1
sprite("cb10m",manx%,many%):
sprite("cb"+
(frame%))+"m",manx%,many%)
jump%=1
sprite("cb9m",manx%,many%):
dir%=1
fall%=1
sprite("c10m",manx%,many%):
sprite("c"+
(frame%))+"m",manx%,many%)
jump%=1
sprite("c9m",manx%,many%):
move%=1
many%=by%*9
jumpc%=0:jump%=0:fall%=1:
map%((
(manx%/bx%))+1,10-
((many%+by%)/by%))>2
many%-((
(many%/by%))*by%)>=36
jumpc%=0:jump%=0:fall%=1:
manx%<bx%*9
map%((
((manx%+bx%)/bx%))+1,10-
((many%+by%)/by%))>2
manx%>((
(manx%/bx%))*bx%)+60
many%-((
(many%/by%))*by%)>=36
jumpc%=0:jump%=0:fall%=1:
jumpc%>=(by%*2)+(fspeed%)
jumpc%=0:jump%=0:fall%=1:
jumpc%=jumpc%+fspeed%
many%=many%+fspeed%
move%=1
manx%<(bx%*9)
map%((
((manx%+bx%)/bx%))+1,11-
(many%/by%))>2
manx%>(((
(manx%/bx%))*bx%)+60)
many%<=((
(many%/by%))*by%)+fspeed%
many%=(
(many%/by%))*by%:fall%=0:
map%((
(manx%/bx%))+1,11-
(many%/by%))>2
many%<=((
(many%/by%))*by%)+fspeed%
many%=(
(many%/by%))*by%:fall%=0:
many%=many%-fspeed%-2
checkff
map%((
(manx%/bx%))+1,11-
(many%/by%))=0
manx%<=(((
(manx%/bx%))*bx%)+60)
fall%=1
drawscreen
scrbs=scrno%*10
my%=1
mapy%
mx%=1
mapx%
sprite(s$(map%(mx%,my%)),mx%*bx%-bx%,(mapy%-my%)*by%)
wait(time)
+(time)
sprite(sprite$,ssx%,ssy%)
sprite$="0"
"OS_SpriteOp",256+34,area%,sprite$,ssx%,ssy%,8
mball
sprite("ballm",ballx%,bally%)
balls
ballsp%=ballsp%+1
ballsp%>20
ballsp%=-20
bally%=bally%-ballsp%
sprite("ball",ballx%,bally%)
complete
bonuses%=0
many%>=comy%
many%<=(comy%+96)
comd%=0
manx%<=comx%
complete%=1
comd%=1
manx%>=comx%
complete%=1
(manx%+58)>=ballx%
manx%<=(ballx%+100)
bally%<(many%+88)
many%<=bally%+100
die%=1:lives%-=1:
mask:
mball:
reset:
many%>=bally%
many%<=bally%+100
die%=1:lives%-=1:
mask:
mball:
reset:
forg%(1,6)=3
(manx%+66)>forg%(2,6)
manx%<(forg%(2,6)+110)
many%<(forg%(3,6)+4)
die%=1:lives%-=1:
mball:
mask:
reset:
badkill%=1
baddies%
bad%(1,badkill%)=1
badex%=114:badey%=52
bad%(1,badkill%)=2
badex%=54:badey%=82
manx%+68>bad%(6,badkill%)
manx%<bad%(6,badkill%)+badex%
many%<bad%(7,badkill%)+badey%
(many%+88)>=bad%(7,badkill%)
die%=1:lives%-=1:
mball:
mask:
reset:
reset
manx%=omanx%
many%=omany%
baddie
bdframe%+=1
bdframe%<>0
bdframe%=5
bdframe%=1
drawbad%=1
baddies%
bad%(1,drawbad%)>0
sprite(
(bad%(1,drawbad%))+"bm",bad%(6,drawbad%),bad%(7,drawbad%))
skip%=0
bad%(8,drawbad%)=0
( bad%(6,drawbad%)-=bad%(9,drawbad%)
bad%(6,drawbad%)<bad%(2,drawbad%)
bad%(6,drawbad%)=bad%(2,drawbad%):bad%(8,drawbad%)=1:skip%=1
bad%(8,drawbad%)=1
skip%=0
( bad%(6,drawbad%)+=bad%(9,drawbad%)
bad%(6,drawbad%)>bad%(4,drawbad%)
bad%(6,drawbad%)=bad%(4,drawbad%):bad%(8,drawbad%)=0
sprite(
(bad%(8,drawbad%))+
(bad%(1,drawbad%))+"b"+
(bdframe%),bad%(6,drawbad%),bad%(7,drawbad%))
collect
bonh%=32
bonw%=32
manxca%=(
(manx%/bx%))*bx%
manyca%=(
(many%/by%))*by%
colle%=0
many%-manyca%<76
loop%=1
maxbonuses%
bon%(1,loop%)
1:bonh%=82:bonw%=52
2:bonh%=52:bonw%=48
3:bonh%=38:bonw%=46
4:bonh%=72:bonw%=58
bon%(1,loop%)>0
manyca%=(
(bon%(3,loop%)/by%))*by%
L
(manx%+64)>=bon%(2,loop%)
manx%<(bon%(2,loop%)+bonw%)
colle%=1
(many%+88)>=(
(bon%(3,loop%)/by%))*by%
many%<=bon%(3,loop%)+bonh%
L
(manx%+64)>=bon%(2,loop%)
manx%<(bon%(2,loop%)+bonw%)
colle%=1
colle%=1
colle%=0:
coll2
coll2
bon%(1,loop%)
1:cpresents%+=1:mask$="presentsm"
2:crings%+=1:mask$="ringm"
3:cgems%+=1:mask$="gemm"
4:cpuddings%+=1:mask$="puddingm"
bon%(1,loop%)=0
sprite(mask$,bon%(2,loop%),bon%(3,loop%))
bonuses%-=1
bonus
bframe$=
(bframe%))
gemspr$="d"+bframe$
ringspr$="r"+bframe$
bloop%=1
levbon%
bon%(1,bloop%)
sprite("presents",bon%(2,bloop%),bon%(3,bloop%))
sprite(ringspr$,bon%(2,bloop%),bon%(3,bloop%))
sprite(gemspr$,bon%(2,bloop%),bon%(3,bloop%))
sprite("pudding",bon%(2,bloop%),bon%(3,bloop%))
bframe%+=1
bframe%>6
bframe%=1
plot%=0
plot%=1
switches
swloop%=1
switches%
switch%(1,swloop%)=1
manyca%=switch%(3,swloop%)+2
(manx%+64)>=switch%(2,swloop%)
manx%<(switch%(2,swloop%)+68)
swloop%=1
switches%
switch%(1,swloop%)
sprite("lever1",switch%(2,swloop%),switch%(3,swloop%))
sprite("lever3",switch%(2,swloop%),switch%(3,swloop%))
sprite("blockmask",switch%(4,swloop%)*bx%,switch%(5,swloop%)*by%)
8map%(switch%(4,swloop%)+1,(10-switch%(5,swloop%)))=0
sprite("lever1m",switch%(2,swloop%),switch%(3,swloop%))
drawblob
switch%(1,swloop%)=2
background
floop%=1
forg%(1,floop%)
sprite("tree"+
(tree2%),forg%(2,floop%),forg%(3,floop%))
tree%+=1
tree%=22
tree%=1
tree%
1:tree2%=1
8:tree2%=2
15:tree2%=3
foreground
floop%=1
forg%(1,floop%)
sprite("fence",forg%(2,floop%),forg%(3,floop%))
sprite("fence2",forg%(2,floop%),forg%(3,floop%))
sprite("spikes",forg%(2,floop%),forg%(3,floop%))
sprite("snowman",forg%(2,floop%),forg%(3,floop%))
sprite("sign",forg%(2,floop%),forg%(3,floop%))
switch1%=1
sprite("lever1",forg%(2,floop%),forg%(3,floop%)):
switch1%=2
sprite("lever3",forg%(2,floop%),forg%(3,floop%))
switch2%=1
sprite("lever1",forg%(2,floop%),forg%(3,floop%)):
switch2%=2
sprite("lever3",forg%(2,floop%),forg%(3,floop%))
blocks
screen1
comx%=1204
comy%=192
comd%=1
manx%=0
many%=by%*9
omanx%=manx%
omany%=many%
baddies%=2
delay=1.98
balls=1
ballx%=(bx%*3)+10
bally%=(by%*5)+18
ballh=by%*3
ballsp%=0
( fg%=8
levbon%=15
bonuses%=15
spike%=1
mblocks%=0
block%=0
switches%=0
**Map**
0,0,0,0,10,0,0,0,0,0
7,0,12,3,7,0,0,0,0,6
0,0,10,0,0,0,0,0,0,0
0,6,4,3,4,3,7,0,6,3
0,0,10,0,10,0,0,0,0,0
7,0,11,0,6,3,7,0,11,0
0,0,0,0,0,0,0,0,0,0
3,3,3,3,7,0,0,0,0,12
0,0,0,0,0,0,0,0,0,12
4,4,4,4,4,4,4,5,4,9
**Bonuses**
3,30,134
3,120,134
3,210,134
3,300,134
2,404,696
2,494,696
2,574,696
2,654,696
2,734,696
2,654,768
2,734,768
2,660,504
2,740,504
2,820,504
2,1190,888
**Foreground**
1,0,862:REM "1"=fence
1,276,862
2,378,862:REM "2"=long fence
1,154,670
1,0,478
3,896,96:REM "3"=spike
4,1049,670:REM "4"=snowman
5,1182,286:REM "5"=sign
**Baddies**
1,384,96,768,96,384,96,1,8
1,0,288,512,288,128,288,0,7
screen2
comx%=1204
comy%=384
comd%=1
manx%=0
many%=192
omanx%=manx%
omany%=many%
baddies%=2
delay=2
balls=1
ballx%=(bx%*2)+10
bally%=(by%*9)+18
ballh=(by%*3)
ballsp%=0
l fg%=6
levbon%=11
bonuses%=11
spike%=0
mblocks%=0
block%=0
switches%=0
4,7,0,6,3,3,3,3,3,3
13,0,0,0,0,0,0,0,0,0
13,0,0,6,3,3,7,0,6,3
13,0,11,0,0,0,0,0,0,0
9,7,0,0,6,3,13,0,0,0
7,0,0,10,0,0,10,0,6,4
0,0,6,7,0,6,7,0,0,12
0,10,0,0,0,0,0,0,6,3
4,13,0,12,4,4,13,0,0,0
4,4,4,4,4,4,4,4,4,4
**Bonuses**
2,168,600
2,1192,120
2,680,408
2,285,120
2,294,696
2,166,696
2,166,792
2,1062,312
1,159,284
1,287,380
1,415,476
**Foreground**
1,400,476
4,665,766:REM "4"=snowman
5,1182,478:REM "5"=sign
1,10,190
1,144,284
1,272,380
**Baddies**
1,344,192,798,192,384,192,1,8
2,1024,768,1252,768,1024,768,1,6
screen3
comx%=1204
comy%=192
comd%=1
manx%=0
many%=192
ballx%=(bx%*20)+10
bally%=(by%*14)+18
omanx%=manx%
omany%=many%
baddies%=2
delay=2
balls=0
fg%=2
levbon%=66
bonuses%=66
spike%=0
mblocks%=0
block%=0
switches%=0
13,0,0,0,0,0,0,0,0,12
13,0,0,0,0,0,0,0,0,12
13,0,0,0,11,0,0,0,0,12
13,0,0,0,0,0,0,0,0,12
13,0,0,0,11,0,0,0,0,12
13,0,0,0,0,0,11,0,0,6
7,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,6,9
13,0,0,0,0,0,0,0,0,12
4,4,4,4,4,4,4,4,4,4
**Bonuses**
3,158,192
3,248,192
3,338,192
3,428,192
3,510,192
3,600,192
3,690,192
3,780,192
3,870,192
3,960,192
3,158,288
3,248,288
3,338,288
3,428,288
3,510,288
3,600,288
3,690,288
3,780,288
3,870,288
3,960,288
3,158,384
3,248,384
3,338,384
3,428,384
3,510,384
3,600,384
3,690,384
3,960,384
3,1050,384
3,158,480
3,248,480
3,338,480
3,428,480
3,690,480
3,960,480
3,1050,480
3,158,576
3,248,576
3,338,576
3,428,576
3,690,576
3,780,576
3,870,576
3,960,576
3,1050,576
3,158,672
3,248,672
3,338,672
3,428,672
3,690,672
3,780,672
3,870,672
3,960,672
3,1050,672
3,248,768
3,338,768
3,428,768
3,690,768
3,780,768
3,870,768
3,338,864
3,428,864
3,510,864
3,600,864
3,690,864
3,780,864
**Foreground**
1,10,190
5,1182,288
**Baddies**
2,128,96,1024,96,128,96,1,8
2,128,96,1024,96,1024,96,0,8
screen4
comx%=1204
comy%=192
comd%=1
manx%=0
many%=96
omanx%=manx%
omany%=many%
delay=1.97
balls=1
ballx%=(bx%*9)+10
bally%=(by%*6)+18
ballh=(by%*3)
ballsp%=0
baddies%=4
fg%=8
levbon%=14
bonuses%=14
spike%=1
switch1%=1
switch2%=1
mblocks%=0
block%=0
switches%=2
0,14,0,0,0,0,0,0,0,0
3,3,3,3,3,3,3,7,0,0
0,0,0,0,0,0,0,0,0,6
7,0,0,6,7,0,0,6,7,0
0,0,0,0,0,0,0,0,0,0
0,6,7,0,6,7,0,11,0,0
0,0,0,0,0,0,0,0,0,12
3,3,3,3,3,3,3,7,0,12
0,0,0,0,0,0,0,0,0,14
4,4,4,4,4,4,4,4,4,4
**Bonuses**
1,164,480
1,292,480
1,548,480
1,676,480
4,256,864
4,346,864
4,436,864
4,526,864
4,616,864
4,706,864
4,796,864
4,886,864
4,976,864
4,1187,384
**Foreground**
2,0,284
2,134,284
2,268,284
2,402,284
2,536,284
2,670,284
2,804,284
5,1182,190
**Baddies**
2,118,480,354,480,118,480,1,7
2,502,480,738,480,622,480,0,7
2,374,672,610,672,494,672,1,7
1,0,288,896,288,0,288,1,5
**Switches**
1,1182,766,1,9
1,30,862,9,2
load_sprites(sprite_file$)
length%,area_ptr%
"OS_File",13,sprite_file$
,,,,length%
area_ptr% length%+4
area_ptr%!0=length%+4
area_ptr%!4=16
"OS_SpriteOp",9+256,area_ptr%
"OS_SpriteOp",10+256,area_ptr%,sprite_file$
=area_ptr%